/*
 * @Author: 张久冬
 * @Date: 2022-01-06 10:32:26
 * @
# Description:
 */
import JDRequest from '@/service/index'
import { IdataType } from '@/service/type'
import { ICategoryGoodsCountResult } from './type'

enum DashboardAPI {
  categoryGoodsCount = '/goods/category/count',
  categoryGoodsSale = '/goods/category/sale',
  categoryGoodsFavor = '/goods/category/favor',
  addressGoodsSale = '/goods/address/sale'
}

export function getCategoryGoodsCount() {
  return JDRequest.get<IdataType<ICategoryGoodsCountResult>>({
    url: DashboardAPI.categoryGoodsCount
  })
}
export function getCategoryGoodsSale() {
  return JDRequest.get<IdataType<any>>({
    url: DashboardAPI.categoryGoodsSale
  })
}
export function getCategoryGoodsFavor() {
  return JDRequest.get<IdataType<any>>({
    url: DashboardAPI.categoryGoodsFavor
  })
}
export function getCategoryAddressGoodsSale() {
  return JDRequest.get<IdataType<any>>({
    url: DashboardAPI.addressGoodsSale
  })
}
